package com.example.administrator.easy.detailxinfo;

import android.content.pm.ActivityInfo;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.AbsListView;
import android.widget.MediaController;
import android.widget.VideoView;

import com.example.administrator.easy.R;

public class VideoViewinfo extends AppCompatActivity {
    private VideoView videoView;
    private MediaController mediaController;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
//        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
        setContentView(R.layout.activity_video_viewinfo);

        initView();
        setView();
    }

    private void setView() {
        videoView.setVideoPath("http://qn.ieasy.tv/video/201606/1467286725396_149.mp4");
    }

    private void initView() {
        videoView= (VideoView) findViewById(R.id.video_view);
        mediaController=new MediaController(this);
        videoView.setMediaController(mediaController);
        videoView.requestFocus();
    }
}
